'''
    练习爬虫
    https://ssr1.scrape.center/
'''

import requests
import logging
import re
from urllib.parse import urljoin
logging.basicConfig(level=logging.info,format='%(actime)s-%(levelname)s:%(message)s')
Base_Url='https://ssr1.scrape.center'
TOTAL_PAGE =10
# 列表页面爬虫
def scrape_page(url):
    try:
        logging.info("爬虫的链接为%s开始爬虫",url)
        resp=requests.get(url=url)
        if resp.status_code ==200:
            return resp.text
        logging.error('get invalid status %d,请求的链接为%s',resp.status_code,url)
        
    except requests.RequestException as e:
        logging.error('error occur while scraping %s',url,exc_info=True)
def detail_page():
    pass
if __name__ == '__main__':
    pass